import { HttpException, HttpStatus } from "@nestjs/common";

export default function exceptionFactory(errors) {
    const constraints = errors[0].constraints
    const keys = Object.keys(constraints)
    throw new HttpException(constraints[keys[0]], HttpStatus.FORBIDDEN);
}
